#include <stdio.h>

int main()
{
	int n1=0, n2=0, n3=0;
	int eat = 0;
	scanf("%d %d %d", &n1, &n2, &n3);
	if ( n2 >= n3 ) {
		eat += n2 - n3 + 1;
		n2 = n2 - (n2 - n3 + 1);
	}
	if ( n1 >= n2 ) {
		eat += n1 - n2 + 1;
		n1 = n1 - (n1 - n2 + 1);
	}
	if ( n1 <= 0 ) {
		printf("-1");
	}
	else {
		printf("%d", eat);
	}
	return 0;
}
